//
//  RefundCredentialsCell.m
//  BaseProject
//
//  Created by 王洋 on 2020/9/17.
//  Copyright © 2020 王洋. All rights reserved.
//

#import "RefundCredentialsCell.h"

@implementation RefundCredentialsCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        
//        self.
        
    });
    
}

- (void)fillCellWithModel:(CommonRefundDetailModel *)model {
    
    self.image1.hidden = YES;
    self.image2.hidden = YES;
    self.image3.hidden = YES;

    for (int i = 0; i < model.sysMediaList.count; i++) {
        CommonMediaModel *mediaModel = model.sysMediaList[i];
        if (i==0) {
            self.image1.hidden = NO;
            [self.image1 sd_setImageWithURL:[NSURL URLWithString:mediaModel.url] placeholderImage:[UIImage imageNamed:@"placeholder"]];
        }
        
        if (i==1) {
            self.image2.hidden = NO;
            [self.image2 sd_setImageWithURL:[NSURL URLWithString:mediaModel.url] placeholderImage:[UIImage imageNamed:@"placeholder"]];
        }
        
        if (i==2) {
            self.image3.hidden = NO;
            [self.image3 sd_setImageWithURL:[NSURL URLWithString:mediaModel.url] placeholderImage:[UIImage imageNamed:@"placeholder"]];
        }
    }
}

@end
